package com.ma.controller;

import com.ma.entity.Major;
import com.ma.server.MajorServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.ListResourceBundle;

/**
 * @ProjectName: teamProucer
 * @Package: com.ma.controller
 * @ClassName: MajorCon
 * @Author: YHHHH
 * @Description:
 * @Date: 2021/4/9 20:13
 * @Version: 1.0
 */


@RestController
@CrossOrigin
public class MajorCon {

    @Autowired
    private MajorServer majorServer;


    @GetMapping("/major/findAllMajor")
    public List<Major> findAllMajor(){
        List<Major> allMajor = majorServer.findAllMajor();
        return allMajor;
    }



}
